﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="dsAppointments" targetNamespace="http://tempuri.org/dsAppointments.xsd" xmlns:mstns="http://tempuri.org/dsAppointments.xsd" xmlns="http://tempuri.org/dsAppointments.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection ConnectionStringObject="Data Source=MUKESH7-PC\SQLEXPRESS;Initial Catalog=WebMed;User ID=sa;Password=12345678" IsAppSettingsProperty="false" Modifier="Assembly" Name="mukesh7-pc\sqlexpress.WebMed.dbo" ParameterPrefix="@" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="daTblAppoinments" GeneratorDataComponentClassName="daTblAppoinments" Name="dtTblAppoinments" UserDataComponentName="daTblAppoinments">
            <MainSource>
              <DbSource ConnectionRef="mukesh7-pc\sqlexpress.WebMed.dbo" DbObjectName="WebMed.dbo.tblAppointments" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT     tblAppointments.AppointmentId, tblAppointments.DoctorId, tblAppointments.PatientId, tblAppointments.AppointmentDateTime, DATEADD(Minute, 
                      tblAppointments.AppointmentDuration, tblAppointments.AppointmentDateTime) AS [End Time], tblAppointments.Description, tblAppointments.Notes, 
                      tblPatientInfo.FirstName + ISNULL(' ' + tblPatientInfo.LastName, '') AS [Patient Name]
FROM         tblAppointments INNER JOIN
                      tblPatientInfo ON tblAppointments.PatientId = tblPatientInfo.PatientId</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="AppointmentId" DataSetColumn="AppointmentId" />
              <Mapping SourceColumn="DoctorId" DataSetColumn="DoctorId" />
              <Mapping SourceColumn="PatientId" DataSetColumn="PatientId" />
              <Mapping SourceColumn="AppointmentDateTime" DataSetColumn="AppointmentDateTime" />
              <Mapping SourceColumn="End Time" DataSetColumn="End Time" />
              <Mapping SourceColumn="Description" DataSetColumn="Description" />
              <Mapping SourceColumn="Notes" DataSetColumn="Notes" />
              <Mapping SourceColumn="Patient Name" DataSetColumn="Patient Name" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="dsAppointments" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="dsAppointments" msprop:Generator_DataSetName="dsAppointments" msprop:EnableTableAdapterManager="true">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="dtTblAppoinments" msprop:Generator_UserTableName="dtTblAppoinments" msprop:Generator_RowDeletedName="dtTblAppoinmentsRowDeleted" msprop:Generator_RowChangedName="dtTblAppoinmentsRowChanged" msprop:Generator_RowClassName="dtTblAppoinmentsRow" msprop:Generator_RowChangingName="dtTblAppoinmentsRowChanging" msprop:Generator_RowEvArgName="dtTblAppoinmentsRowChangeEvent" msprop:Generator_RowEvHandlerName="dtTblAppoinmentsRowChangeEventHandler" msprop:Generator_TableClassName="dtTblAppoinmentsDataTable" msprop:Generator_TableVarName="tabledtTblAppoinments" msprop:Generator_RowDeletingName="dtTblAppoinmentsRowDeleting" msprop:Generator_TablePropName="dtTblAppoinments">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="AppointmentId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_UserColumnName="AppointmentId" msprop:Generator_ColumnVarNameInTable="columnAppointmentId" msprop:Generator_ColumnPropNameInRow="AppointmentId" msprop:Generator_ColumnPropNameInTable="AppointmentIdColumn" type="xs:int" />
              <xs:element name="DoctorId" msprop:Generator_UserColumnName="DoctorId" msprop:Generator_ColumnVarNameInTable="columnDoctorId" msprop:Generator_ColumnPropNameInRow="DoctorId" msprop:Generator_ColumnPropNameInTable="DoctorIdColumn" type="xs:int" />
              <xs:element name="PatientId" msprop:Generator_UserColumnName="PatientId" msprop:Generator_ColumnVarNameInTable="columnPatientId" msprop:Generator_ColumnPropNameInRow="PatientId" msprop:Generator_ColumnPropNameInTable="PatientIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="AppointmentDateTime" msprop:Generator_UserColumnName="AppointmentDateTime" msprop:Generator_ColumnVarNameInTable="columnAppointmentDateTime" msprop:Generator_ColumnPropNameInRow="AppointmentDateTime" msprop:Generator_ColumnPropNameInTable="AppointmentDateTimeColumn" type="xs:dateTime" />
              <xs:element name="End_x0020_Time" msdata:ReadOnly="true" msprop:Generator_UserColumnName="End Time" msprop:Generator_ColumnVarNameInTable="columnEnd_Time" msprop:Generator_ColumnPropNameInRow="End_Time" msprop:Generator_ColumnPropNameInTable="End_TimeColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="Description" msprop:Generator_UserColumnName="Description" msprop:Generator_ColumnVarNameInTable="columnDescription" msprop:Generator_ColumnPropNameInRow="Description" msprop:Generator_ColumnPropNameInTable="DescriptionColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="255" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Notes" msprop:Generator_UserColumnName="Notes" msprop:Generator_ColumnVarNameInTable="columnNotes" msprop:Generator_ColumnPropNameInRow="Notes" msprop:Generator_ColumnPropNameInTable="NotesColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="255" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Patient_x0020_Name" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Patient Name" msprop:Generator_ColumnVarNameInTable="columnPatient_Name" msprop:Generator_ColumnPropNameInRow="Patient_Name" msprop:Generator_ColumnPropNameInTable="Patient_NameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="101" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:dtTblAppoinments" />
      <xs:field xpath="mstns:AppointmentId" />
    </xs:unique>
  </xs:element>
</xs:schema>